//package com.bookcity.front.webfront.config;
//
//import com.bookcity.front.webfront.security.DouyinAuthProvider;
//import com.bookcity.front.webfront.security.DouyinFilter;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.web.DefaultSecurityFilterChain;
//import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
//import org.springframework.stereotype.Component;
//
///**
// * @author oldliu
// * @since 1.0
// */
//@Component
//public class DouyinConfig extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
//   @Autowired
//    private MyStore  redisTemplate;
//
//    @Override
//    public void configure(HttpSecurity http) throws Exception {
//        DouyinFilter smsAuthenticationFilter = new DouyinFilter();
//        smsAuthenticationFilter.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class));
////        smsAuthenticationFilter.setAuthenticationSuccessHandler(myAuthenticationSuccessHandler);
////        smsAuthenticationFilter.setAuthenticationFailureHandler(myAuthenticationFailureHandler);
//
//        DouyinAuthProvider smsAuthenticationProvider = new DouyinAuthProvider();
//        smsAuthenticationProvider.setRedisTemplate(redisTemplate);
//
//        http.authenticationProvider(smsAuthenticationProvider)
//                .addFilterAfter(smsAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
//
//    }
//}
